/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.kj.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.math.BigDecimal;

/**
 * kj_member_integralsEntity
 * @author hzy
 * @version 2021-07-04
 */
@Table(name="kj_member_integrals", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="member_id", attrName="memberId", label="会员ID"),
		@Column(name="total_integrals", attrName="totalIntegrals", label="总积分"),
		@Column(name="used_integrals", attrName="usedIntegrals", label="已使用积分"),
		@Column(name="total_hours", attrName="totalHours", label="总时长"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class KjMemberIntegrals extends DataEntity<KjMemberIntegrals> {

	private static final long serialVersionUID = 1L;
	private String memberId;		// 会员ID
	private BigDecimal totalIntegrals;		// 总积分
	private BigDecimal usedIntegrals;		// 已使用积分
	private BigDecimal totalHours;		// 总时长

	public KjMemberIntegrals() {
		this(null);
	}

	public KjMemberIntegrals(String id){
		super(id);
	}

	@Length(min=0, max=64, message="会员ID长度不能超过 64 个字符")
	public String getMemberId() {
		return memberId;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}

	public BigDecimal getTotalIntegrals() {
		return totalIntegrals;
	}

	public void setTotalIntegrals(BigDecimal totalIntegrals) {
		this.totalIntegrals = totalIntegrals;
	}

	public BigDecimal getUsedIntegrals() {
		return usedIntegrals;
	}

	public void setUsedIntegrals(BigDecimal usedIntegrals) {
		this.usedIntegrals = usedIntegrals;
	}

	public BigDecimal getTotalHours() {
		return totalHours;
	}

	public void setTotalHours(BigDecimal totalHours) {
		this.totalHours = totalHours;
	}
}
